<?php
defined('BASEPATH') or exit('No direct script access allowed');

/**
 * @model 账户controller，
 */
class Upload extends Home_Controller
{

    public function __construct()
    {
        try {
            parent::__construct();
            $this->load->service("SService/UploadService");
        } catch (\TPException $e) {
            exit($e->getRetJson());
        }
    }


    
    public function upload(){

        $method = $_SERVER['REQUEST_METHOD'];

        if($method == "POST"){
            $res = $this->UploadService->upload($_POST);
        }else{
            $res = $this->UploadService->checkFile($_GET);
        }
       
        exit(retSucc($res));
    }

    
    public function merge(){
        $res = $this->UploadService->merge($_POST);
        exit(retSucc($res));
    }

    

    
}